package com.heima.controller;

import com.heima.pojo.User;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RestController;

@RestController
public class UserController {
    @GetMapping("/user/{id}")
    public User findById(@PathVariable Long id){
        User user = new User();
        user.setId(1L);
        user.setName("lisi");
        System.out.println(user.getName()+"hello");
        return user;
    }
}
